home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Sample Code / Printing Samples / Printer Drivers… / ImageWriterLQ / OldAPIMessageIntf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-13  |  3.8 KB  |  112 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2. FILENAME
  3.     OldAPIMessageIntf.h
  4.  
  5. DESCRIPTION
  6.     This module contains contants and types which are specifically used by the
  7.     OldAPIMessageIntf.c file.  That file implements the ImageWriter LQ's old
  8.     API messages.
  9.     
  10. COPYRIGHT
  11.      Copyright Apple Computer, Inc. 1992
  12.      All rights reserved. 
  13.     
  14.     9/13/93 - dmh - Modified for the b2 seed.
  15.  
  16. -------------------------------------------------------------------------------- */
  17.  
  18. #ifndef __OLDAPIMESSAGEINTF__
  19. #define __OLDAPIMESSAGEINTF__
  20.  
  21.  
  22. /*********************************************************************************
  23.  *                                            CONSTANTS                                                *
  24.  *********************************************************************************/
  25.  
  26. // Miscellaneous constants
  27. enum
  28. {
  29.     kMysticPaperFract                = 120,            // Paper sizes in PREC 3 are expressed as multiples of 120 
  30.     kLQRefNum                        = 5,                //    Refnum in high byte of wDev and PrintX[0] fields
  31.     
  32.     oldIWLQPrintRecordVersion    = 1,                //    This is the print record version supported by the last non-QuickDraw GX based ImageWriter LQ driver
  33.  
  34.     kPlaten15                         = 27,             // platen width in half-inches
  35.     kPlaten8                         = 16,             // platen width in half-inches
  36.     lScale                             = 0x00018000,    // Handmade FIXED POINT scaling value of 1.5
  37.     
  38.     scanTop2Bottom                    =    0,                //    Scan page top to bottom selector
  39.     scanLeft2Right                    =    2,                //    Scan page left to right selector
  40.  
  41.     draft                                =    0,                //    Indicates draft printing
  42.     spool                                =    1,                //    Indicates spooled printing
  43.     
  44.     tray1                                =    1,                //    Indicates tray 1 selected
  45.     tray2                                =    2,                //    Indicates tray 2 selected
  46.     tray3                                =    3,                //    Indicates tray 3 selected
  47.     
  48.     oldPRECAutoFeed                =    1,                //    Old auto-feed setting
  49.     oldPRECManualFeed                =    0                //    Old manual-feed setting
  50. };
  51.  
  52. // Useful bit numbers in the wDev and PrintX[1] fields of the print record 
  53. enum
  54. {
  55.     kHighResBit                = (1 << 0),        // bit0
  56.     kPortraitBit            = (1 << 1),        // bit1
  57.     kBiDirBit                = (1 << 2),        //    bit2
  58.     k66PercentReducBit    = (1 << 3),        //    bit3
  59.     kScrollBit                = (1 << 4),        //    bit4
  60.     kResSetBit                = (1 << 5),        //    bit5
  61.     kDraftBit                = (1 << 6),        //    bit6
  62.     k33PercentReducBit    = (1 << 7)        //    bit7
  63. };
  64.  
  65. // Constants for setting the HeadMotion Job collection item values 
  66. enum
  67. {
  68.     doBidirectional        =    0,                //    Do bidirectional motion
  69.     doUnidirectional        =    1                //    Do unidirectional motion
  70. };
  71.  
  72.  
  73. /*********************************************************************************
  74.  *                                             TYPES                                                     *
  75.  *********************************************************************************/
  76.  
  77. // HeadMotionJobItem - Structure of job collection item indicating the head motion setting 
  78.  
  79. typedef struct
  80. {
  81.     char        direction;    // true if head motion should be unidirectional; false otherwise 
  82. }    HeadMotionJobItem;
  83.  
  84.  
  85. // TraySettingsJobItem - Structure of job collection item indicating the selected tray settings 
  86.  
  87. typedef struct
  88. {
  89.     short        firstPageFromTray;        // index (starting at tray1) of tray to use for first page of document 
  90.     short        remainingFromTray;        // index of tray to use for all remaining pages of the document 
  91. }    TraySettingsJobItem;
  92.  
  93.  
  94. /*********************************************************************************
  95.  *                                            DEFINES                                                    *
  96.  *********************************************************************************/
  97.  
  98. // TestBit - for testing a masked bit 
  99.  
  100. #define TestBit(i, bit)        (((i) & (bit)) == (bit))
  101.  
  102.  
  103. /*********************************************************************************
  104.  *                                    FORWARD DECLARATIONS                                            *
  105.  *********************************************************************************/
  106.  
  107. OSErr    SD_PrValidate(THPrint hPrint, Boolean *wasChanged);
  108. OSErr SD_ConvertPrintRecordTo(THPrint hPrint);
  109. OSErr SD_ConvertPrintRecordFrom(THPrint hPrint);
  110. OSErr SD_PrintRecordToJob(THPrint hPrint, gxJob theJob);
  111.  
  112. #endif __OLDAPIMESSAGEINTF__